{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sample Jupyter Notebook\n",
    "\n",
    "This is a sample notebook to verify that `jupyter` service is working correctly.\n",
    "\n",
    "```bash\n",
    "# [Optional] pre-build the image\n",
    "harbor build jupyter\n",
    "\n",
    "# Launch the service\n",
    "harbor up jupyter\n",
    "\n",
    "# Open the Jupyterlab in the browser\n",
    "harbor open jupyter\n",
    "```\n",
    "\n",
    "Then, you should be able to open and edit this file there. Alternatively, you can access the `jupyter` workspace via:\n",
    "\n",
    "```bash\n",
    "# Opens workspace folder in the File Manager\n",
    "harbor jupyter workspace\n",
    "\n",
    "# See workspace location, \n",
    "# relative to $(harbor home)\n",
    "harbor config get juptyer.workspace\n",
    "```\n",
    "\n",
    "Additionally, you can configure service to install additional packages.\n",
    "\n",
    "```bash\n",
    "# See deps help\n",
    "# It's a manager for underlying array\n",
    "harbor jupyter deps -h\n",
    "\n",
    "# Add packages to install, supports the same\n",
    "# specifier syntax as pip\n",
    "harbor jupyter deps add numpy\n",
    "harobr jupyter deps add SomeProject@git+https://git.repo/some_pkg.git@1.3.1\n",
    "harbor jupyter deps add SomePackage[PDF,EPUB]==3.1.4\n",
    "\n",
    "# Rebuilt the service image for dependencies\n",
    "# to become available\n",
    "harbor down\n",
    "harbor build jupyter\n",
    "harbor up jupyter\n",
    "```\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import torch\n",
    "torch.cuda.is_available()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, Jupyter!\n"
     ]
    }
   ],
   "source": [
    "print('Hello, Jupyter!')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
